package com.letchat.service.impl;

import com.letchat.mapper.CommentMapper;
import com.letchat.mapper.SubjectMapper;
import com.letchat.pojo.CommentParent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class CommentService {
    @Autowired
    private CommentMapper commentMapper;

    /**
     * 发表父评论
     * @param commentParent
     */
    public void makeAParentComment(CommentParent commentParent) {
        commentParent.setCreateTime(LocalDateTime.now());
        commentMapper.addParentComment(commentParent);
    }

}
